package com.cw.demo.factory.normal;

import com.cw.demo.factory.Sender;

/**
 * 普通工厂
 *
 * @author chenw
 * @date 2021/1/4
 */
public class SenderFactory {

    public Sender sender(String type){
        if(type.equals("mail")){
            return new MailSender();
        }else if(type.equals("sms")){
            return new SmsSender();
        }
        return null;
    }
}
